<%@page import="com.group.board.BoardData"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<% request.setCharacterEncoding("UTF-8");%>
<jsp:useBean id="BoardData" class="com.group.board.BoardData"/>
<jsp:setProperty name="BoardData" property="*"/>  <%-- html로 받은 자료를 데이터로 일부 넘김 --%>
<jsp:useBean id="boardMgr" class="com.group.board.BoardMgr"/>
<%
BoardData.setBip(request.getRemoteAddr()); //글을 쓴 컴퓨터의 ip 얻기
BoardData.setBdate(); // 등록 날짜 얻기
int max = boardMgr.currentGetMaxNum()+1; //새 글 번호
BoardData.setNum(max); //글 번호를 넣음
BoardData.setGnum(max);
boardMgr.saveData(BoardData); // 저장완료

response.sendRedirect("boardlist.jsp?page=1");
%>
